﻿@using System.Web.UI.WebControls
@model SIFIET.GestionProgramas.Datos.Modelo.ASIGNATURA

@{
    ViewBag.Title = "Nueva Asignatura";
}
<link href="~/Content/themes/base/multi-select.css" media="screen" rel="stylesheet" type="text/css" />

<div>

    @using (Html.BeginForm("RegistrarAsignatura", "Asignaturas", FormMethod.Post))
    {
        @Html.AntiForgeryToken()
        Html.EnableClientValidation();


        <fieldset>
            <legend>Nueva Asignatura</legend>

            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.EdicionOmodificacion, new { @Value = "registrar" })

            <div>
                Codigo:
                <div>
                    @Html.EditorFor(model => model.CODIGOASIGNATURA)
                    @Html.ValidationMessageFor(model => model.CODIGOASIGNATURA)
                </div>
            </div>
            <div>
                Nombre :
                <div>
                    @Html.EditorFor(model => model.NOMBREASIGNATURA)
                    @Html.ValidationMessageFor(model => model.NOMBREASIGNATURA)
                </div>
            </div>
            Corequisitos :
            <div>
                @Html.ListBoxFor(model => model.ListaCorrequisitos, ViewBag.ListaAsignaturas as MultiSelectList, new { multiple = "multiple" })
                @Html.ValidationMessageFor(model => model.CORREQUISITOSASIGNATURA)

            </div>
            <div>
                Prerequisitos :
                <div>
                    @Html.ListBoxFor(model => model.ListaPrerequisitos, ViewBag.ListaAsignaturas as MultiSelectList, new { multiple = "multiple" })
                    @Html.ValidationMessageFor(model => model.PREREQUISITOSASIGNATURA)
                </div>
            </div>
            <div>
                Creditos :
                <div>
                    @Html.DropDownListFor(model => model.CREDITOSASIGNATURA, new SelectList(new decimal[] { 2, 4, 6 }))
                    @Html.ValidationMessageFor(model => model.CREDITOSASIGNATURA)
                </div>
            </div>
            <div>
                Modalidad :
                <div>
                    @Html.DropDownListFor(model => model.MODALIDADASIGNATURA, new SelectList(new string[] { "Presencial", "Semi-presencial" }))
                    @Html.ValidationMessageFor(model => model.MODALIDADASIGNATURA)
                </div>
            </div>
            <div>
                Clasificacion :
                <div>
                    @Html.EditorFor(model => model.CLASIFICACIONASIGNATURA)
                    @Html.ValidationMessageFor(model => model.CLASIFICACIONASIGNATURA)
                </div>
            </div>
           @Html.HiddenFor(model => model.ESTADOASIGNATURA, new { @Value = "Activo" })
            <div>
                Descripcion :
                <div>
                    @Html.TextAreaFor(model => model.DESCRIPCIONASIGNATURA)
                    @Html.ValidationMessageFor(model => model.DESCRIPCIONASIGNATURA)
                </div>
            </div>


            <div>
                <div>
                    <input type="submit" value="Guardar" onclick="return confirmacionAgregarAsignatura();" />
                    <input type="submit" value="Cancelar" onclick="return confirmSalirAsignatura();" />
                </div>
            </div>
        </fieldset>

    }
</div>
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery-ui-1.8.11.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.multi-select.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.quicksearch.js"></script>
<script>cargarMultiselectDocument();</script>
